// Copyright (C) Kumo inc. and its affiliates.
// Author: Jeff.li lijippy@163.com
// All rights reserved.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//
#pragma once

#include <string>
#include <unordered_set>

namespace kumo::pollux::functions {
    // Print a rst format string which contains all Presto/Spark scalar
    // functions and aggragate functions. This function will read
    // all_scalar_functions.txt and all_aggregate_functions.txt from certain path.
    // for Presto, path is pollux/functions/prestosql/coverage/data/
    // for Spark, path is pollux/functions/sparksql/coverage/data/
    // domain is like a namespace. for spark function, domain is ":spark".
    void printCoverageMapForAll(const std::string &domain = "");

    // Print a rst format string which contains Presto/Spark functions were
    // supported by pollux. domain is like a namespace. for spark function, domain
    // is ":spark".
    void printPolluxFunctions(
        const std::unordered_set<std::string> &linkBlockList,
        const std::string &domain = "");

    // Print a rst format string which contains most used Presto/Spark
    // functions.This function will read all_scalar_functions.txt and
    // all_aggregate_functions.txt and most_used_functions from certain path.
    // for Presto, path is pollux/functions/prestosql/coverage/data/
    // for Spark, path is pollux/functions/sparksql/coverage/data/
    // domain is like a namespace. for spark function, domain is ":spark".
    void printCoverageMapForMostUsed(const std::string &domain = "");
} // namespace kumo::pollux::functions
